﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ScreenTester
{
    public abstract class ExecutiveOperation
    {
        public OperationType OperType { get; protected set; }
        public ExecutiveOperation(OperationType type)
        {
            OperType = type;
        }
    }

    public class MouseOperation : ExecutiveOperation
    {
        public MouseEventFlag[] MouseEvents { get; protected set; }
        public int X { get; protected set; }
        public int Y { get; protected set; }
        public MouseOperation(int x, int y, MouseEventFlag[] mouseEvents)
            : base(OperationType.MouseOperation)
        {
            X = x;
            Y = y;
            MouseEvents = mouseEvents;
        }

        public MouseOperation(MouseEventFlag[] mouseEvents)
            : base(OperationType.MouseOperation)
        {
            X = -1;
            Y = -1;

            MouseEvents = mouseEvents;
        }
    }

    public class KeyboardOperation : ExecutiveOperation
    {
        public Keyboard[] Keyboards { get; protected set; }
        public KeyboardOperation(Keyboard[] keyboards)
            : base(OperationType.KeyboardOperation)
        {
            Keyboards = keyboards;
        }
    }

    public class TextInputOperation : ExecutiveOperation
    {
        public string Text { get; protected set; }
        public TextInputOperation(string text)
            : base(OperationType.Text)
        {
            Text = text;
        }

    }

    public class SeparatorOperation : ExecutiveOperation
    {
        public int WaitingTime { get; protected set; }
        public SeparatorOperation(int waitingTime)
            : base(OperationType.Separator)
        {
            WaitingTime = waitingTime;
        }
    }

    public class ApplicationOperation : ExecutiveOperation
    {
        public string ApplicationName { get; protected set; }
        public string ApplicationTitle { get; protected set; }
        public int Width { get; protected set; }
        public int Height { get; protected set; }
        public ApplicationOperation(int width, int height)
            : base(OperationType.Application)
        {
            Width = width;
            Height = height;
        }
        public ApplicationOperation(string applicationName
            , string applicationTitle, int width, int height)
            : base(OperationType.Application)
        {
            ApplicationName = applicationName;
            ApplicationTitle = applicationTitle;
            Width = width;
            Height = height;
        }
    }
}
